﻿/*
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

using Xunit;

using Unity.Commons.Client.Threading;
using Unity.Commons.Client.Generator;

using Unity.Debug;

namespace Unity.Commons.Client.Tests.Threading
{
    public class UnityResourceThreadTest
    {
        private readonly ConsoleUnityClient _unityClient = new ConsoleUnityClient();
        private readonly ConsoleUnityProducer _unityProducer = new ConsoleUnityProducer();

        private static bool TestAsyncTask()
        {
            return false;
        }

        [Fact]
        public void Test()
        {
           
            UnityResourceThread unityResourceThread = new UnityResourceThread(_unityClient, _unityProducer, "123456");
            Assert.Equal("resource-thread", unityResourceThread.RoleName());
            List<UnityGenerator> testNewGenerators = new List<UnityGenerator>();
            int needGenerators = 15;
            for (int i = 0; i < needGenerators; i++)
            {
                testNewGenerators.Add(unityResourceThread.GetNewGenerator());
            }
            Assert.True(testNewGenerators.Count == needGenerators);
            for(int i = 0; i < needGenerators; i++)
            {
                Assert.NotNull(testNewGenerators[i]);
            }

            int taskRuns = unityResourceThread.DoWork();
            Assert.Equal(1, taskRuns);

            Task<bool> asyncTaskCompletionSource = unityResourceThread.RunAsync(TestAsyncTask);
            Assert.False(asyncTaskCompletionSource.Result);
        }
        

    }
}
*/
